#include "libGeoutils/shape/CoordZ.h"
#include "libGeoutils/shape/Rectangle.h"
#include "libGeoutils/shape/Polyline.h"
#include "libGeoutils/shape/Segment.h"
#include <vector>

int main()
{
	std::string op_str;

	geo::shape::Coord coord(30.432, 50.43);
	coord.toJsonFile("E:/coord.txt");

	geo::shape::CoordZ coordZ(130.432, -50.43, -200);
	coordZ.toJsonFile("E:/coordz.txt");

	geo::shape::Rectangle rect(30.5, 40, 20.6, 35.1);
	rect.toJsonFile("E:/rect.txt");

	geo::shape::Rectangle rect_2;
	rect_2.from_json(op_str);
	rect_2.toJsonFile("E:/rect_2.txt");

	geo::shape::Polyline pline;
	pline.appendCoord(std::make_shared<geo::shape::Coord>(30.432, 50.43));
	pline.appendCoord(std::make_shared<geo::shape::Coord>(31.432, 51.43));
	pline.appendCoord(std::make_shared<geo::shape::Coord>(32.432, 52.43));
	pline.toJsonFile("E:/pline.txt");

	geo::shape::Segment segment;
	segment.setStart(std::make_shared<geo::shape::Coord>(30.432, 50.43));
	segment.setEnd(std::make_shared<geo::shape::Coord>(31.432, 51.43));
	segment.toJsonFile("E:/segment.txt");
	return 0;
}